<?php namespace Framework\Kernel;

class App
{
	
	public function run()
	{	
		// 自动加载函数
		spl_autoload_register([$this,'autoload']);

		// 判断传入的url是否存在
		$m = isset($_GET['m'])?$_GET['m']:'Home';
		$c = isset($_GET['c'])?$_GET['c']:'Index';
		$a = isset($_GET['a'])?$_GET['a']:'index';
		// print_r($a);
		$class = $m.'\\Controller\\'.$c.'Controller';
		// print_r($class);exit;
		$obj = new $class;//Home\Controller\IndexController
		// print_r($class);exit;
		$obj->$a();//=>index();
	}

	public function autoload($class)
	{
		$class = str_replace('\\', '/', $class);
		print_r($class);
	}


}












 ?>